import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		isUpdate: false,
		proxyDetail: {},
		userInfo: uni.getStorageSync('userInfo') || {},
		statusBarHeight: 20,
		navHeight: 88
	},
	mutations: {
		setIsUpdate (state, val) {
			state.isUpdate = val
		},
		setProxyDetail (state, data) {
			state.proxyDetail = data
		},
		setUserInfo (state, data) {
			state.userInfo = data
		},
		setBarHeight (state, value) {
			state.statusBarHeight = value.statusBarHeight
			state.navHeight = value.navHeight
		}
	},
	actions: {

	}
})

export default store